﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="PostLastest.ascx.cs" Inherits="Controls_PostLastest" %>
<div class="tabberlive">
    <ul class="tabbernav">
        <%--class="tabberactive"--%>
        <li class="tabberactive" id="tab1"><a href="#" title="Bài Viết Mới">Bài
        Viết Mới</a></li>
        <li class="" id="tab2"><a href="#" title="Bài Nổi Bật">Bài Nổi Bật</a></li>
        <li class="" id="tab3"><a title="Bình Luận">Bình Luận</a></li>
    </ul>
    <div id="plvietnam-recent-news" class="tabbertab recent_news" title="">
        <h2 class="widgettitle">Bài Viết Mới</h2>
        <ul>
            <asp:Repeater ID="rpt" runat="server">
                <ItemTemplate>
                    <li><a href="<%#UrlBuilder.GetNewsDetail(Eval("TextId").ToString(),Eval("CreatedDate")) %>" rel="bookmark"
                        title="<%#Eval("Title") %>">
                        <img src="<%#UrlBuilder.GetImage(Eval("ImageUrl").ToString(),45,45,true) %>" alt="<%#Eval("Title") %>" style='width: 45px; height: 45px;'>
                    </a><a href="<%#UrlBuilder.GetNewsDetail(Eval("TextId").ToString(),Eval("CreatedDate")) %>" rel="bookmark"
                        title="Permanent Link to <%#Eval("Title") %>">
                        <%#Eval("Title") %></a> <span class="meta"><%#FormatString.DateTimeToString(Eval("CreatedDate").ToString()) %></span> </li>
                </ItemTemplate>
            </asp:Repeater>
        </ul>
    </div>
    <div id="plvietnam-popular-posts" class="tabbertab plvietnam_popular_posts " title="" style="display: none">
        <h2 class="widgettitle">Bài Nổi Bật</h2>
        <ul>
            <asp:Repeater ID="rptView" runat="server">
                <ItemTemplate>
                    <li><a href="<%#UrlBuilder.GetNewsDetail(Eval("TextId").ToString(),Eval("CreatedDate")) %>" rel="bookmark">
                        <%#Eval("Title") %></a>
                        <br>
                        <span class="comm_bubble"><%#Wp.BLL.TblCommentsManager.CreateInstant().NumCommentOfPost(Eval("Id").ToInt()) %> comments</span></li>
                </ItemTemplate>
            </asp:Repeater>
        </ul>
    </div>
    <div id="plvietnam-recent-comments" class="tabbertab recent_comments"
        title="" style="display: none">
        <h2 class="widgettitle">Bình Luận</h2>
        <ul>
            <asp:Repeater ID="rptComment" runat="server">
                <ItemTemplate>
                    <li>
                        <a href="<%#UrlBuilder.GetNewsDetail(Eval("TextId").ToString(),Eval("CreatedDate")) %>"><%#Eval("Author") %>:</a>   <%#FormatString.SplitString( Eval("Content"),200) %><span class="meta"><%#FormatString.DateTimeToString(Eval("CreatedDate").ToString()) %></span>
                    </li>
                </ItemTemplate>
            </asp:Repeater>
        </ul>
        <div style="text-align:right"><a href="/comment.html"><i>Xem thêm>></i></a></div>
    </div>
    <div class="cleaner">
        &nbsp;
    </div>
</div>
<script type="text/javascript">
    $(document).ready(function () {
        $("#tab2").click(function () {
            $("#plvietnam-recent-news").css("display", "none");
            $("#plvietnam-popular-posts").css("display", "block");
            $("#plvietnam-recent-comments").css("display", "none");
            $("#tab2").addClass("tabberactive");
            $("#tab1").removeClass("tabberactive");
            $("#tab3").removeClass("tabberactive");
            return false;
        });
        $("#tab1").click(function () {
            $("#plvietnam-recent-news").css("display", "block");
            $("#plvietnam-popular-posts").css("display", "none");
            $("#plvietnam-recent-comments").css("display", "none");
            $("#tab1").addClass("tabberactive");
            $("#tab2").removeClass("tabberactive");
            $("#tab3").removeClass("tabberactive");
            return false;
        });
        $("#tab3").click(function () {
            $("#plvietnam-recent-news").css("display", "none");
            $("#plvietnam-popular-posts").css("display", "none");
            $("#plvietnam-recent-comments").css("display", "block");
            $("#tab1").removeClass("tabberactive");
            $("#tab2").removeClass("tabberactive");
            $("#tab3").addClass("tabberactive");
            return false;
        });
    });
</script>
